# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=py3-pcbnewtransition
pkgver=0.4.1
pkgrel=0
pkgdesc="Easily support KiCAD 7, 6 and 5 in your KiCAD plugins by monkeypatching older versions to KiCAD 7 API"
url="https://github.com/yaqwsx/pcbnewTransition"
# riscv64: py3-shapely
# aarch64, armv7, armhf: py3-solidpython
# s390x: kicad
arch="noarch !riscv64 !aarch64 !armv7 !armhf !s390x"
license="MIT"
depends="
	kicad
	python3
	"
makedepends="
	py3-gpep517
	py3-python-versioneer
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/yaqwsx/pcbnewTransition/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pcbnewTransition-$pkgver"
options="!check" # no tests in the repo

prepare() {
	default_prepare

	# unvendor old versioneer
	rm -f versioneer.py
}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
5e3d68279d7626b1cb7bc6a2f265c1b3ee2fd283a55cbf7d765931553ad6fae95ae3365d1543d4711124a53a170dd884f612c6dc09d4a4e56856837b2bf73351  py3-pcbnewtransition-0.4.1.tar.gz
"
